/**
*****************************************************************************
 * @file system.h
 * @brief SYS设备函数(LED, 存储, 调试串口)
 * @author Moon
 * @version V1.0.0
 * @date 2022/08/29
****************************************************************************
 */
#ifndef _SYSTEM_H
#define _SYSTEM_H

#include <stdint.h>
#include "FreeRTOS.h"
#include "task.h"
#include "dev_w25qxx.h"
#include "dev_fm24clxx.h"
#include "dev_dac8830.h"
#include "dev_tca6416.h"
#include "dev_ad7193_temp.h"	
#include "SC16IS752.h"
#include "dev_switch.h"
#include "dev_tca9535.h"
#include "main_task.h"
#include "backfill_task.h"

/* Public defines -----------------------------------------------------------*/
/* Public Struct -----------------------------------------------------------*/

/* Public enum -----------------------------------------------------------*/
#ifndef BOOT_PROJECT
typedef enum
{
    SYS_MODE_WORK = 1,
    SYS_MODE_UPDATA,
    SYS_MODE_DEBUG,
    SYS_MODE_NUM,
} WOKE_MODE_e;
#endif

/* Public Variable ---------------------------------------------------------*/
//全局变量
extern dev_dac8830_t dac8830;
extern dev_adc7193_t adc7193_temp;
extern dev_adc7193_t adc7193_press;
extern uint64_t g_glpCnt;
extern bool mon_pumpTim_switch;
extern uint32_t g_pumpCnt;
extern uint8_t g_presCtrlEn;
extern uint8_t g_presState;
extern DataServer_t data_server;
extern TaskHandle_t DetectTask_Handler; 

//Pointer
//Array

extern dev_sc16is752_t sc16is752_a;

extern dev_adc7193_t adc7193;
//Const
/* Pubilc function prototypes -----------------------------------------------*/
void set_sys_wokemode(uint8_t mode);

void system_init(void);

void SetDeviceInfo(char *data, uint8_t len);
uint8_t GetDeviceInfo(void);

#endif // _SYSTEM_H
